from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.contrib.auth.models import *
from os.path import normpath, join, dirname

import logging

from dl4.dailylang.authz import *

# Get an instance of a logger
logger = logging.getLogger('dl4.views')

def hello(request):
    logger.debug('hello')    
    logger.info('hello')    
    logger.warn('hello')    
    LOCAL_PATH = normpath(join(dirname(__file__),'..','..'))
    logger.debug('LOCAL_PATH = %s', LOCAL_PATH)
    return HttpResponse("Hello world")

@appkey_required('Application Key')
def registration_form(request):
    return render_to_response('registration_form.html')

